<template>
    <section class="form-container">
        <div class="form-content">
            <el-table
                v-loading="loading"
                style="width: 100%"
                :data="passengerList"
                border
                stripe
                :header-cell-style="headerCellStyle"
            >
                <el-table-column label="序号" width="60">
                    <template #default="scope">
                        {{ scope.$index + 1 }}
                    </template>
                </el-table-column>
                <el-table-column prop="name" label="姓名">
                    <template #default="scope">
                        {{ scope.row.name+'('+scope.row.passengerTypeName+')'}}
                    </template>
                </el-table-column>
                <el-table-column prop="certificateTypeName" label="证件类型"/>
                <el-table-column prop="certificateNo" label="证件号码"/>
                <el-table-column prop="phone" label="手机号"/>
                <el-table-column prop="seatName" label="座位">
                    <template #default="scope">
                        {{ scope.row.seatName+'('+scope.row.seatTypeName+')'}}
                    </template>
                </el-table-column>
                <el-table-column prop="startAddress" label="从"/>
                <el-table-column prop="endAddress" label="到"/>

            </el-table>
        </div>
    </section>
</template>
<script>
import {ArrangeApi} from '@/api/intercity/ArrangeApi'

export default {
    name: 'IntercityArrangePassenger',
    components: {},
    data() {
        return {
            passengerList: [],
            loading: false,
            headerCellStyle: {
                "background-color": "#F2F5FC"
            },
            arrangeCode:''
        }
    },
    created() {
        this.arrangeCode = this.$router.currentRoute.query.arrangeCode
        this.getPage()
    },
    methods: {
        // 获取用户列表
        getPage() {
            this.loading = true
            ArrangeApi.getArrangePassengerList(this.arrangeCode).then((response) => {
                this.passengerList = response
                this.loading = false
            }).catch((err) => {
                this.loading = false
            })
        },

    }
}

</script>

<style lang="scss" scoped></style>

